﻿using System.Configuration.Provider;
using NCMIS.AccessControl;
using NCMIS.ObjectModel;
using NCMIS.ObjectModel.MetaData;
using NCMIS.Produce;

namespace NCMIS.Provider
{
    /// <summary>
    /// Provides the base implementation for the ACL Provider for the ACL Services.
    /// </summary>
    public abstract class ObjectProviderBase : ProviderBase
    {
        public abstract CmisObject CreateDocument(string repositoryId, CmisProperties properties, string folderId, ContentStream contentStream, VersioningState versioningState, string[] policies, AccessControlList addACEs, AccessControlList removeACEs);

        public abstract string CreateDocumentFromSource(string repositoryId, string sourceId, CmisProperties properties, string folderId, VersioningState? versioningState, string[] policies, AccessControlList addACEs, AccessControlList removeACEs);

        public abstract CmisObject CreateFolder(string repositoryId, CmisProperties properties, string folderId, string[] policies, AccessControlList addACEs, AccessControlList removeACEs);

        public abstract string CreateRelationship(string repositoryId, CmisProperties properties, string[] policies, AccessControlList addACEs, AccessControlList removeACEs);

        public abstract CmisObject CreatePolicy(string repositoryId, CmisProperties properties, string folderId, string[] policies, AccessControlList addACEs, AccessControlList removeACEs);

        public abstract AllowableActions GetAllowableActions(string repositoryId, string objectId);

        public abstract CmisObject GetObject(string repositoryId, string objectId, string filter, bool includeAllowableActions, IncludeRelationships includeRelationships, string renditionFilter, bool includePolicyIds, bool includeAcl);

        public abstract CmisProperties GetProperties(string repositoryId, string objectId, string filter);

        public abstract CmisObject GetObjectByPath(string repositoryId, string path, string filter, bool? includeAllowableActions, IncludeRelationships? includeRelationships, string renditionFilter, bool? includePolicyIds, bool? includeACL);

        public abstract ContentStream GetContentStream(string repositoryId, string objectId, string streamId);

        public abstract Renditions GetRenditions(string repositoryId, string objectId, string renditionFilter, string maxItems, string skipCount);

        public abstract TokenedCmisObjectId UpdateProperties(string repositoryId, string objectId, CmisProperties properties, string changeToken);

        public abstract void MoveObject(string repositoryId, string objectId, string targetFolderId, string sourceFolderId);

        public abstract void DeleteObject(string repositoryId, string objectId, bool allVersions);

        public abstract string[] DeleteTree(string repositoryId, string folderId, bool? allVersions, UnfileObjects? unfileObject, bool? continueOnFailure);

        public abstract TokenedDocumentId SetContentStream(string repositoryId, string documentId, ContentStream contentStream, bool? overwriteFlag, string changeToken);

        public abstract TokenedDocumentId DeleteContentStream(string repositoryId, string documentId, string changeToken);
    }
}
